package org.yuanqiframework.yuanqi.web;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

@Data
@Component
@ConfigurationProperties(prefix = "yuanqi.web")
public class WebProperty {
    /**
     * 缓存管理器
     * redis,memory
     */
    private String cacheManager = "redis";
    /**
     * 密钥
     */
    private String tokenSecret = "secret";
    /**
     * token过期时间，单位秒
     */
    private int tokenExpireTime = 120;
    /**
     * 请求头
     */
    private String tokenHeader = "Authorization";

    /**
     * 是否使用数据库权限管理
     */
    private Boolean authWithDb = true;
    /**
     * 是否使用注解权限管理
     */
    private Boolean authWithAnnotation = true;


}
